/*
 * Created: Author: Ivan Lampert / Date: Fev 01, 2015
 * 
 * Changed: $Author: ac280593@gmail.com $ / $Date: 2015-06-05 00:24:45 +0000 (Fri, 05 Jun 2015) $
 */
package com.cpm.wrapper;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

public final class AttributeMap<KEY, VALUE> implements Serializable {
    private static final long serialVersionUID = 74972923983281167L;
    
    private final Map<KEY, VALUE> attributes = new HashMap();

    public AttributeMap() {}
    
    public final void putAttribute(KEY key, VALUE value) {
        SolidObjects.notNullValues(key, value);
        attributes.put(key, value);
    }
    
    public final VALUE getAttribute(KEY key) {
        SolidObjects.notNull(key);
        return attributes.get(key);
    }
    
    public final void removeAttribute(KEY key){
        SolidObjects.notNull(key);
        attributes.remove(key);
    }
}
